class BleScanResult{
  String device;
  int rssi;
  String name;

  BleScanResult({required this.device, required this.rssi, required this.name});

  factory  BleScanResult.fromJson(dynamic json){
    return BleScanResult(
      device: json['device'] ?? "",
      rssi: json['rssi'] ?? 0,
      name: json['name'] ?? ""
    );
  }
}

class BleScanResultListModel{
  List<BleScanResult> data = [];

  BleScanResultListModel({required this.data});

  factory  BleScanResultListModel.fromJson(List json){
    return BleScanResultListModel(data:json.map((i)=>BleScanResult.fromJson((i))).toList());
  }
}
